//
//  WBDataLoadView.swift
//  weibo
//
//  Created by  郭航 on 16/7/8.
//  Copyright © 2016年 郭航. All rights reserved.
//

import UIKit

class WBDataLoadView: UIView {
    
    private lazy var textLabel: UILabel = UILabel(textColor: APPTintColor, textAlignment: .Center, font: 20)
    
    private lazy var activityIndicatorView: UIActivityIndicatorView = {
        let activity = UIActivityIndicatorView()
        
        activity.color = APPTintColor
        activity.startAnimating()
        
        return activity
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        backgroundColor = UIColor.whiteColor()
        
        addSubview(textLabel)
        
        textLabel.snp_makeConstraints { (make) in
            make.centerX.equalTo(self).offset(-30)
            make.centerY.equalTo(self)
        }
        
        textLabel.text = "正在加载"
        
        addSubview(activityIndicatorView)
        
        activityIndicatorView.snp_makeConstraints { (make) in
            make.centerX.equalTo(self).offset(30)
            make.centerY.equalTo(self)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

}
